package com.aggron.config;

import com.bstek.uflo.console.UfloServlet;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.web.servlet.ServletRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.ImportResource;

/**
 * uflo配置类
 * @author liuhuan
 * @2018年6月17日 14:47:05
 */
@Configuration
@ComponentScan
@EnableAutoConfiguration
@ImportResource({ "classpath:uflo-context.xml" })
public class UfloConfig {

    @Bean(name = "uRuleServlet")
    public ServletRegistrationBean registerURuleServlet() {
        return new ServletRegistrationBean(new UfloServlet(), "/uflo/*");
    }
}
